{extend name="common/common" /}

{block name="style"}
<style media="screen">
p{
	margin:0;
}
#background{
	position:fixed;z-index:-1;
}
#grid{
	display:none;
}
footer[role="footer"] {
	display: none;
}
#main {
	width: 100%;
	height: 100%;
	padding-top: 90px;
	overflow: hidden;
	position: relative;
}
#main .sidebar {
	width: 300px;
	height: 100%;
	position: absolute;
	overflow-x: hidden;
	overflow-y: auto;
	padding-top: 15px;
	padding-bottom: 300px;
	background-color: #FFF;
	left: 0;
}

#main .content{
	margin-left: 300px;
	height: 100%;
}

</style>
{/block}

{block name="content"}
<ul id="grid">
	<li><img src="__IMG__/home-images/image-4.jpg"/></li>
</ul>
<div id="main">
	<div class="sidebar">
	    <el-menu default-active="0" @select="changePDF">
			<el-menu-item-group title="arch">
	        	<el-menu-item index="0">安装arch win 双系统</el-menu-item>
				<el-menu-item index="1">桌面及常用应用</el-menu-item>
				<el-menu-item index="2">修复Grub2引导</el-menu-item>
				<el-menu-item index="3">Mariadb+Nginx+PHP</el-menu-item>
	        </el-menu-item-group>
			<el-menu-item-group title="centos">
	        	<el-menu-item index="4">基础配置</el-menu-item>
				<el-menu-item index="5">安装邮件服务</el-menu-item>
				<el-menu-item index="6">Mariadb+Nginx+PHP</el-menu-item>
	        </el-menu-item-group>
			<el-menu-item-group title="常用命令">
	        	<el-menu-item index="7">配置FTP</el-menu-item>
				<el-menu-item index="8">配置SVN</el-menu-item>
				<el-menu-item index="9">mariadb常用命令</el-menu-item>
				<el-menu-item index="10">Nginx反向代理和负载均衡</el-menu-item>
				<el-menu-item index="11">redis消息队列</el-menu-item>
				<el-menu-item index="12">ssl证书</el-menu-item>
	        </el-menu-item-group>
	    </el-menu>
	</div>
	<div class="content">
		<embed src="__RESOURCE__/pdf/arch_install.pdf#toolbar=0&navpanes=0&scrollbar=0" width="100%" height="100%" type="application/pdf" id="pdf">
	</div>
</div>
{/block}

{block name="script"}
<script type="text/javascript">
var main = new Vue({
	el:"#main",
	data:{
		pdf_list:[
			'__RESOURCE__/pdf/arch_install.pdf',
			'__RESOURCE__/pdf/arch_desktop.pdf',
			'__RESOURCE__/pdf/arch_grub.pdf',
			'__RESOURCE__/pdf/arch_lnmp.pdf',
			'__RESOURCE__/pdf/centos_base.pdf',
			'__RESOURCE__/pdf/centos_mail.pdf',
			'__RESOURCE__/pdf/centos_lnmp.pdf',
			'__RESOURCE__/pdf/ftp.pdf',
			'__RESOURCE__/pdf/svn.pdf',
			'__RESOURCE__/pdf/mariadb.pdf',
			'__RESOURCE__/pdf/nginx.pdf',
			'__RESOURCE__/pdf/redis.pdf',
			'__RESOURCE__/pdf/ssl.pdf',
		]
	},
	methods:{
		changePDF(index) {
			var url = this.pdf_list[index] + "#toolbar=0&navpanes=0&scrollbar=0";
			$("#pdf").attr({src:url});
		}
	}
});
</script>
{/block}
